package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcImportador generated by hbm2java
 */
@Entity
@Table(name = "RC_IMPORTADOR", schema = "RUC")
public class RcImportador implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4816332028840154485L;
	private RcImportadorId id;
	private RcRuc rcRuc;
	private Date ffimportador;
	private String cusuario;
	private Date fhingreso;
	private String cusuarioFin;
	private String nfolio;

	public RcImportador() {
	}

	public RcImportador(RcImportadorId id, RcRuc rcRuc, String cusuario,
			Date fhingreso) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public RcImportador(RcImportadorId id, RcRuc rcRuc, Date ffimportador,
			String cusuario, Date fhingreso, String cusuarioFin, String nfolio) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.ffimportador = ffimportador;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.cusuarioFin = cusuarioFin;
		this.nfolio = nfolio;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "fiimportador", column = @Column(name = "FI_IMPORTADOR", nullable = false, length = 7)) })
	public RcImportadorId getId() {
		return this.id;
	}

	public void setId(RcImportadorId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false, insertable = false, updatable = false)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_IMPORTADOR", length = 7)
	public Date getFfimportador() {
		return this.ffimportador;
	}

	public void setFfimportador(Date ffimportador) {
		this.ffimportador = ffimportador;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "C_USUARIO_FIN", length = 30)
	public String getCusuarioFin() {
		return this.cusuarioFin;
	}

	public void setCusuarioFin(String cusuarioFin) {
		this.cusuarioFin = cusuarioFin;
	}

	@Column(name = "N_FOLIO", length = 12)
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

}
